*Please use "Congruence in PR_replication data"
*please change directory: cd "C:\XXX"


*table 1
gsem (1.averthreecabinets <- eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 RI1[ccode])  (2.averthreecabinets <- eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 RI2[ccode]) if smd2==0 & ccode~=666 &  coalition==1, mlogit
outreg2 using cong1, bdec(2) word excel replace label 
gsem (1.averthreecabinets <- eff_nr_parl_parties rile_range threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 RI1[ccode])  (2.averthreecabinets <- eff_nr_parl_parties rile_range threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 RI2[ccode]) if smd2==0 & ccode~=666 &  coalition==1, mlogit
outreg2 using cong1, bdec(2) word excel append label 


*table 2
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averleftrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 

*predicted probability 
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
margins, at(conf2weightedaver_2=(0.1(0.1)0.4) ccode=205) atmeans


*table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition median_voter2 if smd2==0 & ccode~=666, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label


*table 4  
sum weightedmeanposition if smd2==0 & ccode~=666 & averleftleftcabinet==1
sum weightedmeanposition if smd2==0 & ccode~=666 & averrightrightcabinet==1
sum weightedmeanposition if smd2==0 & ccode~=666 & averleftrightcabinet==1
sum median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1
sum median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1
sum median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1
sum weightedmeanposition if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1
sum weightedmeanposition if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1
sum weightedmeanposition if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1
sum median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1
sum median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1
sum median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1


*Online Appendix

*different samples 

*without New Zealand
*table 2
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 & ccode~=920 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 & ccode~=920 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averleftrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 & ccode~=920 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 

*table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition median_voter2 if smd2==0 & ccode~=666 & ccode~=920, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & ccode~=920 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & ccode~=920 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & ccode~=920 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label

*without Greece
*table 2
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 & ccode~=350 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 & ccode~=350 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averleftrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 & ccode~=350 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 

*table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition median_voter2 if smd2==0 & ccode~=666 & ccode~=350, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & ccode~=350 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & ccode~=350 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & ccode~=350 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label


*with Israel
*table 2
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averleftrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 

*table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition median_voter2 if smd2==0, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label

*time period as in Powell (2009) and Golder and Lloyd (2014)
*table 2
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd==0 & voter_id~=. &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd==0 & voter_id~=. &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averleftrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd==0 & voter_id~=. &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 

*table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition median_voter2 if smd==0 & voter_id~=., absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd==0 & voter_id~=. & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd==0 & voter_id~=. & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd==0 & voter_id~=. & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label

*including the position of the right-most and left-most parties in addition to polarization
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 rile_min rile_max i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 rile_min rile_max i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averleftrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 rile_min rile_max i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 

*Government congruence analysis with the threshold variable
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition threshold2 median_voter2 if smd2==0 & ccode~=666, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2 median_voter2 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2 median_voter2 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2 median_voter2 if smd2==0 & ccode~=666 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label

*Alternative analyses not including the median voter's position

*table 2
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averleftrightcabinet eff_nr_parl_parties rile_polarization threshold2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 

*table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition if smd2==0 & ccode~=666, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization if smd2==0 & ccode~=666 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label

*including predicted probability of the actual coalition government as a variable
gsem (1.averthreecabinets <- eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 predictedval RI1[ccode])  (2.averthreecabinets <- eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 predictedval RI2[ccode]) if smd2==0 & ccode~=666 &  coalition==1, mlogit
outreg2 using cong2, bdec(2) word excel replace label
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 predictedval i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label

*descriptive statistics
sum govdistance averthreecabinets averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 legdistance rile_range coalition threshold2 rile_max rile_min firstgov enorightparties maxrightvote2 maxleftvote2 rightmostKF nofcabinetparties growthprevyear inflationprevyear predictedval if smd2==0 & threshold2~=. & govdistance~=.
sum govdistance2 legdistance2 CSESrightrightcabinet CSESleftleftcabinet CSES_polarization medianleftright if smd2==0 & threshold2~=. & govdistance2~=. & eff_nr_parl_parties~=.


*Robustness tests

*Dependent variable: Type of coalition
*Conditional logit models
clogit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2  if smd==0 &  coalition==1, group(ccode) 
outreg2 using cong2, bdec(2) word excel replace label 
clogit averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2  if smd==0 &  coalition==1, group(ccode) 
outreg2 using cong2, bdec(2) word excel append label 
clogit averleftrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2  if smd==0 &  coalition==1, group(ccode) 
outreg2 using cong2, bdec(2) word excel append label 

*Dependent variable: Government congruence
*Including number of cabinet parties
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization nofcabinetparties coalition median_voter2 if smd2==0 & ccode~=666, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 nofcabinetparties if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 nofcabinetparties if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 nofcabinetparties if smd2==0 & ccode~=666 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label


*Analysis with CSES data
areg govdistance2 legdistance2 CSESrightrightcabinet CSESleftleftcabinet eff_nr_parl_parties CSES_polarization coalition medianleftright if smd2==0, robust absorb(ccode)
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance2 legdistance2 CSESrightrightcabinet CSESleftleftcabinet eff_nr_parl_parties CSES_polarization  medianleftright if smd2==0 & coalition==1, robust absorb(ccode)
outreg2 using cong3, bdec(2) word excel append label
areg govdistance2 CSESrightrightcabinet CSESleftleftcabinet eff_nr_parl_parties CSES_polarization medianleftright if smd2==0 & coalition==1, robust absorb(ccode)
outreg2 using cong3, bdec(2) word excel append label
reg govdistance2 legdistance2 CSESrightrightcabinet CSESleftleftcabinet eff_nr_parl_parties CSES_polarization medianleftright if smd2==0 & coalition==1, robust cluster(ccode)
outreg2 using cong3, bdec(2) word excel append label


*Including the lagged dependent variable
sort ccode govtseq
gen laggedgovdistance=govdistance[_n-1] if ccode==ccode[_n-1]
xtset ccode
xtreg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition median_voter2 laggedgovdistance if smd2==0 & ccode~=666, fe cluster(ccode)
outreg2 using cong3, bdec(2) word excel replace label
xtreg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 laggedgovdistance if smd2==0 & ccode~=666 & coalition==1, fe cluster(ccode)
outreg2 using cong3, bdec(2) word excel append label
xtreg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 laggedgovdistance if smd2==0 & ccode~=666 & coalition==1, fe cluster(ccode)
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 laggedgovdistance if smd2==0 & ccode~=666 & coalition==1, cluster(ccode)
outreg2 using cong3, bdec(2) word excel append label


*Including first government after elections
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization firstgov median_voter2 if smd2==0 & ccode~=666, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 firstgov if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 firstgov if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 firstgov if smd2==0 & ccode~=666 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label

*Measuring polarization with ideological range
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_range median_voter2 if smd2==0 & ccode~=666, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_range median_voter2  if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_range median_voter2  if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_range median_voter2 if smd2==0 & ccode~=666 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label


*Alternative explanations

*Populist parties
*table 1
gsem (1.averthreecabinets <- populistcabparty eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 RI1[ccode])  (2.averthreecabinets <- populistcabparty eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 RI2[ccode]) if smd2==0 & ccode~=666 &  coalition==1, mlogit
outreg2 using cong1, bdec(2) word excel replace label 

*table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet populistcabparty eff_nr_parl_parties rile_polarization coalition median_voter2 if smd2==0 & ccode~=666, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet populistcabparty eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet populistcabparty eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet populistcabparty eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label


*Accounting for decade effects
gen decade40=.
gen decade50=.
gen decade60=.
gen decade70=.
gen decade80=.
gen decade90=.
gen decade00=.
gen decade10=.


replace decade40=1 if electiondate~=. & electiondate>=194000 & electiondate<195000
replace decade40=0 if electiondate~=. & decade40~=1
replace decade50=1 if electiondate~=. & electiondate>=195000 & electiondate<196000
replace decade50=0 if electiondate~=. & decade50~=1
replace decade60=1 if electiondate~=. & electiondate>=196000 & electiondate<197000
replace decade60=0 if electiondate~=. & decade60~=1
replace decade70=1 if electiondate~=. & electiondate>=197000 & electiondate<198000
replace decade70=0 if electiondate~=. & decade70~=1
replace decade80=1 if electiondate~=. & electiondate>=198000 & electiondate<199000
replace decade80=0 if electiondate~=. & decade80~=1
replace decade90=1 if electiondate~=. & electiondate>=199000 & electiondate<200000
replace decade90=0 if electiondate~=. & decade90~=1
replace decade00=1 if electiondate~=. & electiondate>=200000 & electiondate<201000
replace decade00=0 if electiondate~=. & decade00~=1
replace decade10=1 if electiondate~=. & electiondate>=201000 & electiondate<202000
replace decade10=0 if electiondate~=. & decade10~=1

*Table 2
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode decade50 decade60 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averleftleftcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode decade50 decade60 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averleftrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode decade50 decade60 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
    
*Table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition median_voter2 decade50 decade60 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 decade50 decade60 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 decade50 decade60 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 decade50 decade60 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label

*Table 4 for coalitions only

sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1 & decade40==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1 & decade40==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1 & decade40==1

sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1 & decade50==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1 & decade50==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1 & decade50==1

sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1 & decade60==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1 & decade60==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1 & decade60==1

sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1 & decade70==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1 & decade70==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1 & decade70==1

sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1 & decade80==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1 & decade80==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1 & decade80==1

sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1 & decade90==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1 & decade90==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1 & decade90==1

sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1 & decade00==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1 & decade00==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1 & decade00==1

sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftleftcabinet==1 & coalition==1 & decade10==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averrightrightcabinet==1 & coalition==1 & decade10==1
sum weightedmeanposition median_voter2 if smd2==0 & ccode~=666 & averleftrightcabinet==1 & coalition==1 & decade10==1

*Excluding decade40
*table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization coalition median_voter2 if smd2==0 & ccode~=666 & decade40~=1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & coalition==1 & decade40~=1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & coalition==1 & decade40~=1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet eff_nr_parl_parties rile_polarization median_voter2 if smd2==0 & ccode~=666 & coalition==1 & decade40~=1, robust
outreg2 using cong3, bdec(2) word excel append label


*Economic factors
*table 2
logit averrightrightcabinet inflationprevyearweig growthprevyearweig eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averleftleftcabinet inflationprevyearweig growthprevyearweig eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averleftrightcabinet inflationprevyearweig growthprevyearweig eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 i.ccode decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
 
 
*table 3
areg govdistance legdistance averrightrightcabinet averleftleftcabinet inflationprevyearweig growthprevyearweig eff_nr_parl_parties rile_polarization coalition median_voter2 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel replace label
areg govdistance legdistance averrightrightcabinet averleftleftcabinet inflationprevyearweig growthprevyearweig eff_nr_parl_parties rile_polarization median_voter2 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
areg govdistance averrightrightcabinet averleftleftcabinet inflationprevyearweig growthprevyearweig eff_nr_parl_parties rile_polarization median_voter2 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 & coalition==1, absorb(ccode) robust
outreg2 using cong3, bdec(2) word excel append label
reg govdistance legdistance averrightrightcabinet averleftleftcabinet inflationprevyearweig growthprevyearweig eff_nr_parl_parties rile_polarization median_voter2 decade70 decade80 decade90 decade00 decade10 if smd2==0 & ccode~=666 & coalition==1, robust
outreg2 using cong3, bdec(2) word excel append label

	
*Including effective number of parties on the right, vote share of the largest right-wing party, position of the largest right wing party (K-F transfomation), and number of parties in the cabinet

logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 enorightparties i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel replace label 
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 maxrightvote2 i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 maxleftvote2 i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 rightmostKF i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 
logit averrightrightcabinet eff_nr_parl_parties rile_polarization threshold2  median_voter2 conf2weightedaver_2 conf3weightedaver_2 conf4weightedaver_2 conf5weightedaver_2 conf6weightedaver_2 conf7weightedaver_2 enorightparties maxrightvote2 maxleftvote2 rightmostKF i.ccode if smd2==0 & ccode~=666 &  coalition==1, robust
outreg2 using cong2, bdec(2) word excel append label 


*Five variables (voter_id govdisto legdisto govid_el med_parl) are included to allow other scholars to check the differences between our measurements and those in Powell(2009).
